---
title: 'Pointer Drag'
---

- official demo:
- https://www.babylonjs-playground.com/#YEZPVT

For declarative version we just need to declare as a child of the mesh.
Properties like `dragAxis` determine how dragging will occur.

```tsx
<pointerDragBehavior
  dragAxis={new Vector3(1, 0, 0)}
  ...
/>
```

<code src="./pointer-drag/PointerDrag.tsx" />
